//
//  FGHomeViewController.m
//  Mi6App
//
//  Created by Mr.Lemon on 7/25/13.
//  Copyright (c) 2013 4G Secure. All rights reserved.
//

#import "FGHomeViewController.h"

@interface FGHomeViewController ()

@end

@implementation FGHomeViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

#pragma mark - Rotate
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (BOOL)shouldAutorotate
{
    return NO;
}

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
   [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navbar.png"] forBarMetrics:UIBarMetricsDefault];
}
//
//-(void)viewDidAppear:(BOOL)animated
//{
//    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
//}
//- (NSUInteger)supportedInterfaceOrientations{
//    return UIInterfaceOrientationMaskPortrait;
//}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)onBtnLastestVoucherClick:(id)sender {
    
    FGListVoucherController *viewController=[[FGListVoucherController alloc] initWithNibName:@"FGListVoucherController" bundle:nil];
    [self.navigationController pushViewController:viewController animated:YES];
}

- (IBAction)onBtnVoucherBookletClick:(id)sender {
    FGListVoucherController *viewController=[[FGListVoucherController alloc] initWithNibName:@"FGListVoucherController" bundle:nil];
    [self.navigationController pushViewController:viewController animated:YES];
}

- (IBAction)onBtnSocialSettingClick:(id)sender {
    FGShareSettingViewController *viewController=[[FGShareSettingViewController alloc] initWithNibName:@"FGShareSettingViewController" bundle:nil];
    [self.navigationController pushViewController:viewController animated:YES];
}

- (IBAction)onBtnAboutClick:(id)sender {
   FGAboutViewController  *viewController=[[FGAboutViewController alloc] initWithNibName:@"FGAboutViewController" bundle:nil];
    [self.navigationController pushViewController:viewController animated:YES];
}

- (IBAction)onBtnSettingClick:(id)sender {
    FGSettingViewController *viewController=[[FGSettingViewController alloc] initWithNibName:@"FGSettingViewController" bundle:nil];
    [self.navigationController pushViewController:viewController animated:YES];
    
}

@end
